package com.zhang.zhangapp.view;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.TextView;

import com.zhang.zhangapp.R;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;


/**
 * Created by Administrator on 2017/7/1.
 */
@ContentView(R.layout.activity_common_web)
public class CommonWebViewActivity extends BaseAppCompatActivityActivity {

    @ViewInject(R.id.action_bar_left_image)
    TextView backTxt;

    @ViewInject(R.id.action_bar_title)
    TextView titleTxt;

    @ViewInject(R.id.common_web_view)
    WebView webView;
    private String url;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        url = getIntent().getStringExtra("url");
        webView.loadUrl(url);
        titleTxt.setText(getIntent().getStringExtra("title"));
    }

    @Event(R.id.action_bar_left_image)
    private void back(View v){
        this.finish();
    }
}
